package com.huowenjie.web;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;



@RestController
public class TestCOntroller {

    @RequestMapping("test002/{name}")
    public String test(@PathVariable String name){
        if("1".equals(name)){
            throw new RuntimeException("+=========出错了=========");
        }
        System.out.println("=========实例被访问========");
         return name;
    }

}
